-- calculate the number of entries
local count = 0

function Entry () 
	count = count + 1
end

dofile("data1")
print("number of entries: " .. count)

-- get the author name from data file
local authors = {}

function Entry (e)
	authors[e.author or "unknown"] = true
end

dofile("data2")
for name in pairs(authors) do
	print("name: " .. name)
end

--[=[
function Entry (e)
	authors[e[1]] = true
end

dofile("data1")
for name in pairs(authors) do
	print("name: " .. name)
end
--]=]
